Inferring Strings from Runs
نویسندگان
چکیده
A run in a string is a nonextendable periodic substring in the string. Detecting all runs in a string is important and studied both from theoretical and practical points of view. In this paper, we consider the reverse problem of it. We reveal that the time complexity depends on the alphabet size k of the string to be output. We show that it is solvable in polynomial time for both binary alphabet and infinite alphabet, while it is NP-complete for finite k ≥ 4. We also consider a variant of the problem where only a subset of runs are given as an input. We show that it is solvable in polynomial time for infinite alphabet, while it is NP-complete for finite k ≥ 3.
منابع مشابه
Inferring Strings from Graphs and Arrays
This paper introduces a new problem of inferring strings from graphs, and inferring strings from arrays. Given a graph G or an array A, we infer a string that suits the graph, or the array, under some condition. Firstly, we solve the problem of finding a string w such that the directed acyclic subsequence graph (DASG) of w is isomorphic to a given graph G. Secondly, we consider directed acyclic...
متن کاملThe sk-strings method for inferring PFSA
We describe a simple, fast and easy to implement recursive algorithm with four alternate intuitive heuristics for inferring Probabilistic Finite State Automata. The algorithm is an extension for stochastic machines of the k-tails method introduced in 1972 by Biermann and Feldman for non-stochastic machines. Experiments comparing the two are done and benchmark results are also presented. It is a...
متن کاملBinary Strings Without Odd Runs of Zeros
We look at binary strings of length n which contain no odd run of zeros and express the total number of such strings, the number of zeros, the number of ones, the total number of runs, and the number of levels, rises and drops as functions of the Fibonacci and Lucas numbers and also give their generating functions. Furthermore, we look at the decimal value of the sum of all binary strings of le...
متن کاملCounting Palindromic Binary Strings Without r-Runs of Ones
A closed-form expression is derived for the enumeration of all palindromic binary strings of length n > r having no r-runs of 1’s, in terms of the r-Fibonacci sequence. A similar closed-form expression for the number of zeros contained in all such palindromic binary strings is derived in terms of the number of zeros contained in all binary strings having no r-runs of 1’s.
متن کاملString Inference from the LCP Array
The suffix array, perhaps the most important data structure in modern string processing, is often augmented with the longest common prefix (LCP) array which stores the lengths of the LCPs for lexicographically adjacent suffixes of a string. Together the two arrays are roughly equivalent to the suffix tree with the LCP array representing the tree shape. In order to better understand the combinat...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010